package social.hub.oauth.jersey;

import java.net.URI;

import social.hub.oauth.OAuthAuthorizationException;

import com.sun.jersey.oauth.client.OAuthClientFilter.AuthHandler;

class AuthorizationAuthHandler implements AuthHandler {

	private String token;
	private String tokenSecret;

	@Override
	public String authorize(URI authorizationUri) {
		throw new OAuthAuthorizationException();
	}

	@Override
	public void authorized(String token, String tokenSecret) {
		this.token = token;
		this.tokenSecret = tokenSecret;
	}

	public String getToken() {
		return token;
	}

	public String getTokenSecret() {
		return tokenSecret;
	}

	public boolean hasToken() {
		return token != null || tokenSecret != null;
	}

};